Matplotlib二十五种预设风格,让你的绘图秒变好看,快进来get一下吧!!! 您所在的位置:网站首页 Get Lucky风格 Matplotlib二十五种预设风格,让你的绘图秒变好看,快进来get一下吧!!!

Matplotlib二十五种预设风格,让你的绘图秒变好看,快进来get一下吧!!!

2024-06-26 20:10| 来源: 网络整理| 查看: 265

目录

前言

Matplotlib预设风格

第一种(dark_background)

第二种(bmh)

​第三种(classic)

第四种(fast)

​第五种(fivethirtyeight) 

第六种(ggplot)

第七种(grayscale)

第八种(seaborn-bright)

第九种(seaborn-colorblind)​

第十种(seaborn-dark-palette)

第十一种(seaborn-dark)

第十二种(seaborn-darkgrid)

第十三种(seaborn-deep)

第十四种(seaborn-muted)

第十五种(seaborn-notebook)

第十六种(seaborn-paper)

第十七种(seaborn-pastel)​

第十八种(seaborn-poster)

第十九种(seaborn-talk)​

第二十种(seaborn-ticks)

第二十一种(seaborn-white)​

第二十二种(seaborn-whitegrid)

​第二十三种(seaborn)

第二十四种(Solarize_Light2)​

第二十五种(tableau-colorblind10)

尾言

前言

本文概述:CSDN上关于Matplotlib的风格设置很多都只是告诉你有什么样的风格,读者无法很直观的去进行选择,还需要自己一种一种风格的去尝试,作者考虑到这样一种一种的尝试,是非常繁琐且枯燥乏味的。因此作者打算写下这篇文章,将Matplotlib的共二十五种风格的效果全部通过实例展示出来,方便读者进行风格选择。

作者介绍:作者本人是一名人工智能炼丹师,目前在实验室主要研究的方向为生成式模型,对其它方向也略有了解,希望能够在CSDN这个平台上与同样爱好人工智能的小伙伴交流分享,一起进步。谢谢大家鸭~~~

 如果你觉得这篇文章对您有帮助,麻烦点赞、收藏或者评论一下,这是对作者工作的肯定和鼓励。  

Matplotlib预设风格 第一种(dark_background) import matplotlib.pyplot as plt plt.style.use('dark_background')#本文所有效果图均只修改该行代码 plt.subplot(222) plt.plot([1,2,3,4],[1,2,3,4],color='r',marker='o') plt.grid(True) plt.text(2,2,"this is (2,2)") plt.subplot(223) plt.plot([1,2,3,4],[2,2,2,2],color='b') plt.show()

 风格的设置,要放在最上面。

 第二种(bmh),代码同上只有style不同,以下为展示效果供大家参考  第三种(classic)

 

 第四种(fast) 第五种(fivethirtyeight) 

 

 第六种(ggplot) 第七种(grayscale)

 

第八种(seaborn-bright)

第九种(seaborn-colorblind)

第十种(seaborn-dark-palette) 第十一种(seaborn-dark)

 

第十二种(seaborn-darkgrid) 第十三种(seaborn-deep)

第十四种(seaborn-muted) 第十五种(seaborn-notebook) 第十六种(seaborn-paper)

第十七种(seaborn-pastel)

第十八种(seaborn-poster)

第十九种(seaborn-talk)

第二十种(seaborn-ticks)

第二十一种(seaborn-white)

第二十二种(seaborn-whitegrid) 第二十三种(seaborn)

 

第二十四种(Solarize_Light2)

第二十五种(tableau-colorblind10)

尾言

 如果您觉得这篇文章对您有帮忙,请点赞、收藏。您的点赞是对作者工作的肯定和鼓励,这对作者来说真的非常重要。如果您对文章内容有任何疑惑和建议,欢迎在评论区里面进行评论,我将第一时间进行回复。 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有